package com.xinqi.modules.course.image.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.course.image.dto.req.CourseImageCreateDTO;
import com.xinqi.modules.course.image.dto.req.CourseImageUpdateDTO;
import com.xinqi.modules.course.image.dto.rsp.CourseImageResultDTO;
import com.xinqi.modules.course.image.domain.CourseImageEntity;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 课程背景封面图表转换
 *
 * @author: system
 * @date: 2023/03/22
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class CourseImageConvert {
    public abstract CourseImageEntity create(CourseImageCreateDTO s);

    public abstract CourseImageEntity update(CourseImageUpdateDTO s, @MappingTarget CourseImageEntity t);

    public abstract CourseImageEntity update(CourseImageUpdateDTO s);

    public abstract CourseImageResultDTO convert(CourseImageEntity s);
}
